migrated user registration specs and related code to the rails app