Finished backend for authentication and client