added authentication and registration