Remote authentication

The idea taken from http://4trabes.com/2012/10/31/remote-authentication-with-devise/