Re factor test server code. Pass database into app module as argument.
Pass test for login route.