improved and fixed errors in event trigger. improved login technique