Include annotate gem. Add validation on User for name presence and email presence and unique. Also add tests for the validations.
Add password_digest attribute to User model. Add bcypt gem. Validate the user password and password_confirmation. Add tests for password and confirmation.
Add test for downcasing before save. Refactor code in model.