@triampmeili The issue you are facing with the creation of a deployment which targets a group is a known issue in Mender 2.5.0, please follow this advice to upgrade to the most recent bugfix release:
For the second issue you are reporting, the 401 Authorization Required
means the JWT token is not valid anymore (it has an expiration date/time in it) and you should request a new one using the login end-point.