fixed .empty to .nil in user.rb