Added libs as an app so that testing can easily be done on it, refactored login_required_middleware for easier testing and started the test suite for it