More work on login and added logout route