added navigation handling for logging in/logging out