Move user.rb to lib