added user role to session and minor cleanup