I learned this from Atlassian support:
Yes. I experienced this kind on conflict also in my instance. I think it is because of JIRA and Confluence running in the same server with the same DNS. It seems that the browser do not know how to differentiate the DNS between different ports.
I use the Remember Me check box when I login to the test instance JIRA and Confluence so that it will login automatically if the session expired.
You may want to consider using our Crowd product for single sign-on (SSO) for JIRA and Confluence.
For more information, please refer to http://www.atlassian.com/software/crowd/
Then I wrote back and got the following reply:
"Btw - checking the "remember me" will not change much. That is when I get the "remove forms authentication" like message."
Sorry my mistake. It seems its not working for me either.
"I believe that this is a bug?"
I can assure you that this is not a bug. This is just the limitation of the browser. You may want to try to save your password in the browser and see the saved password from the configuration of the borwser that it does not capture the port. The browser cookies does not capture the port and it make the browser to think that both the JIRA and Confluence is the same site. However, the session is not the same in both JIRA and Confluence. When you login to JIRA, the browser store the session of JIRA but when you login to Confluence, it replace the session with the one from Confluence. Since the session has changed, you can't access JIRA anymore.
Not only the port, if you use the server JIRA and Confluence in the same machine with different URL path such as http://10.4.98.14/jira and http://10.4.98.14/confluence the browser will consider it as the same server also.
Conclusion: looks like this one is a browser issue.