working on #1842: Prevent users from logging in if maintenance mode is on