moved Authenticate function to user.go, so I don't have to import rethinkdb again