moved tournaments logic to controller, refactored route
moved sql queries out of controller
refactored login route, added controller, moved queries