fix problem whith tryng get property of non-object on login. (#67)