Fixed bug where role was not being passed to the client