alerts and login validation improved