bugfix, authentication check

Signed-off-by: Eduardo Stuart <stuart.eduardo@gmail.com>