Logging in and out is now properly handled.