Login tests
MR to add unit tests for the login router using pytest, pytest-mock, and pytest-asyncio. It also updates the pyproject to use more recent versions of pytest to take advantage of some newer features. pytest-mock is a really helpful wrapper to use unittest mocks with pytest. pytest tests are more readable and intuitive, as opposed to the build in unittests.
pytest-asyncio is a library to run async tests. Using pystest-asyncio also required two new fields in pytest.ini. The asyncio_mode=auto field allows pytest-asyncio to discover async tests even without the @pytest.mark.asycio decorator. Incidentally, this fixes the problem where async tests were being skipped in data_test.py. The asyncio_default_fixture_loop_scope="function" field fixes a small bug in the most recent version of pytest-asyncio where a deprecation warning always shows unless this is set. This default value is suggested by pystest-asyncio docs and can be overwritten in specific fixtures.
This MR also removes the deprecated @app.on_event functions in favor of the recommended lifespan events.
Finally, it removes the detail field from the HTTPException raised when a user does not have a valid session or we're unable to get the user info from gitlab. Type url cannot be serialized into json and it was causing an error and masking the actual error message - unauthorized.