Code cleanup and minor fixes in function call
Add function requestPassword