When multiple applications are configured on the same domain with separate ports, users will be constantly logged out of each application as the SESSION_COOKIE_NAME is identical.
This is due to the Tomcat configuration. Please alter the default bundled Tomcat 7 config so that it has a unique JIRA session cookie by modifying the $JIRA_INSTALL/conf/context.xml to the following (or something similar):
This will prevent users from getting into this problem in the first place.
Additional workarounds can be found within User is Constantly Logged out of JIRA.