This is a code for login user using core data