added authentication and reworked models
fixed a few bugs
small tweak