Replace loose comparison with casting to boolean.
In any case AuthComponent::user() returns null not empty array when user isn't logged in.
Fix coding standards