optmize the login and register page