refactor to use sinatra url to authenticate user