Fixed config and added opals logout function