Added loginWithTemp function.