fix user creation to log in automatically and redirect properly