Add routes tests and tweak the login