encrypted passwords and splitted api call in multiple javascript file for more clarity