implemented role switching while user is logged in