Added auth functionality