Returning 401 Unauthorized if no token or an invalid token is supplied