Added devise gem
installed devise
added config.action_mailer.default_url_options = { host: 'localhost', port: 3000 } to config/env/dev
added config.assets.initialize_on_precompile = false to application.rb
ran rails g devise user
added before_action :authenticate_user! to posts_controller
Oushing to david.