Redirect to dashboard if the user is logged in.