split log-in to its own method
change method name as per isaac's suggestion
Merge pull request #26 from nburka/api-login-relocate-change

split log-in to its own method