adding user to database changed and also checks email during login