added server side authentication