Added Auto-logout, and an import check if the flask-testing package isn't installed