Handles user authentication
userId - the id of user
put refresh_token in cookie if authentication is successfully
An access_token if authentication is successfully
Handles user authentication