cleanup and moved validation to User class