updated to use generic views
initial data fixed, permissions added, token generation added