cleaning up, proper login validation