added errors to registration and loginn