added admin and user logic