Modified the redirect logic for the login and menu screens