sample ror(rails-3.2,ruby-1.9.3) application to use device for login, logout