Frontend API refactoring, basic authentication