enhanced login page and fixed some bugs