added error checking to login
error warnings set to red
error checking in login function