check if logged in before logging in again to Heroku.