Fix bug 894612 - Refactor loginapi to be static