Added user and admin functions