create user session in the backend and store user details in core data entity