server side authentication and database finished