login and register page modified and added error message