Added check for empty cookie (invalid username and pass)