redirect to previous page after login/logout, plus stub profile page