Update role dao and service, rewrite security, add logout