added ico and started login fuction migrate from login.php