made authorize method accessible
extracting db connection
adding .godir for heroku
added uid attribute to user model
refactored login method, implemented json object