class SessionsController

def create

POST /resource/sign_in
def create
  if authenticate(resource_name)
    set_flash_message :success, :signed_in
    redirect_back_or_to home_or_root_path
  else
    unauthenticated!
    build_resource
    render :new
  end
end