(1) Return an error message if the token isn't sent
(2) If it isn't a google user, verifies the token and checks that the user exists
(3) If it is a google user, makes a request to the google API with the token to get the user's email, and then checks if a user with that email exists.
(4) Returns the email, verification status, role, and id for the user found
url: "<http://localhost:8000/getUser>"
headers: {
"Content-Type":"application/json",
"token": "JRRTolkien",
"google": "true" // only set to true if it is a google user, optional field or false otherwise
}
(1) Checks that the token is in the header and the currentPassword and newPassword are in the body of the request.
(2) Verifies the token and checks that the user is registered
(2) Verifies that the current password is correct or sends the appropriate error message.
(3) Updates the password in the database, and sends an email to confirm the password change if gmail is enabled