changed the way authorisation is made for MATA

Signed-off-by: Marcin Wiatr <mail.wichura@gmail.com>