Fixed registering and page navigation when user logged in