fixed a bug on authentication
all features implemented