bug fixing on authorization