Implemented login functionality

Having some issues with the csrf_token of WTForms.