finished some uncomplete code for using core auth system