I don't understand this, Martini has an awesome middleware that supports Google, Github, Facebook and LinkedIn out of the box:
https://github.com/martini-contrib/oauth2
with easy ways to check to see if a user is authenticated.
Gorm is an awesome choice, but this code just looks messy to me