auth changes: refactored api, changed a lot of logic