added more functionality to getUserByEmail flow