Secure Login PHP

Im reading PHP, MySQL and Apache in 24 hours and trying to create a login page on a chapter that talks about sessions and cookies. Is it safe to create a login using sessions and cookies?

Thanks,

Leo