Wrapper for authentication, lots more JS semicolons!