Work in progress converting authentication RPC from Coffee to JS
Fixed the issue where req.session.save assumed returning error as null, but was returning as undefined
Fixed the issues affecting the authentication RPC file