Login based on permissions and roles.