Make logincheck use middleware to test.