Login

Controllers with authentication:

````ruby
class HelloController < ApplicationController
    before_filter :authenticate_user_from_token!
    before_filter :authenticate_user!

   ....
end
````

Create a user and test ````authentication_token````:

````ruby
u = User.new
u.email = 'hello@foo.com'
u.password = 'nba123123'
u.password_confirmation = 'nba123123'
u.save
````
Test authentication token: 
````
u.authentication_token
````

Test api by: 

````
curl -H 'Accept: application/json'  -H 'Content-Type: application/json'  -H 'X-API-TOKEN: <authentication_token>'  -H 'X-API-EMAIL: <email>'   <api_endpoint_url>
````