local adjusment
moving function login model to user model