update permission module and finish user login/logout