added error messages to log in and search