fixed problems with authentication, added example on user.rb