moved validation rules to model
fixed validation
added check existent user functionality