Fix sign in redirect loop