correctly redirects to next page after login
removed secret keys