Redirection to /im from /login when authenticated