Simplified the while statement that wasn't needed. Also, I added avatar pathname to the session for ease of access.
oops. Accidently got rid of the admin panel. Re-inserting it.