Adds the login check and logout route