fixed nested realm logout and authorization