```ruby
class UsersController < ApplicationController
    def new
  end

  def create
  end

  def show
  end

  private

  def user_params
  end
end
```

Add logic to user controller
user
```ruby
class UsersController < ApplicationController

  def new
    @user = User.new
  end

  def create
    @user = User.new(user_params)
    if @user.save
      session[:user_id] = @user.id
      redirect_to '/', notice: "You have successfully signed up!"
    else
      render 'new'
    end
  end

  private

  def user_params
    params.require(:user).permit(:username, :email, :password, :password_confirmation)
  end

end
```
assistant