Corrected login routing to account for login status