Fixed a few bugs with the login routing