Added a few login checks.