Added username and refactored for it. added external config and refactored for it. added appropriate reponse statuses