Rails token based authentication implementation. For use with ng-token-auth.