Now always redirects to last page upon login and logout