Refactored the code to support externalized parameters for the login
handler