added authentication and rspecs