use helper to authenticate user in sinatra app controller.