login: refactor login by getting it out from the endpoints code
Merge branch 'master' of https://github.com/iamdoron/Tribute