Create loggedinas.js

Included methods to support achievements.