Modified usermanage function to classbased view