Fixed logging in and out.