Work on group api pages

Fixed some functions in db_functions, secure_functions, started working
on group api pages