Added support for role checking while logging in