login functions and restricted admin bar