BZ-1056476 - SecurityException when logging out from BAM