Register login fix to redirect when not on home page