Fixed User controller to work better with cancan and wrote some tests