user model

login and encrypt functions.