Add base auth code to api, passwords being checked, session id generated