Validation of users

validation in login, user_add and edit_user