Fixed error on finalizing tests.
Use IntegrityError to check that user exists.
Added Flask-Login for authorization, and Ping API