- finish login/logout functionality and basic auth check