fixed sign in/sign out bugs