Add client side and server side auth. Add event model for database