moved login/logout function to accounts.views.