Fixing bug in SimpleAuth