cleaned up auth.js, added some documentation, changed the localStorage entry name for the user data