better logging
fixing error
new code for login redirect that should work on heroku
removed logging for /login redirect