Fixed bug in login-middleware where case-insensitive search on username did not set username upon user-not-found