some refactored sessions_controller code.
refactor of spec/features/user_spec.rb