We pass header and data separately now so no need to check id size is less than header size. Add error reporting of login type and error string describing the error when login status has failed.